package haxibiao

func IsAnagram(s string, t string) bool {
	// 先按map写
	if len(s) != len(t) {
		return false
	}
	m1 := map[int32]int{}
	for _, ok := range s {
		m1[ok]++
	}
	for _, ok := range t {
		if m1[ok] == 0 {
			return false
		}
		m1[ok]--
	}
	return true
}
